Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Mar 24, 2025

Codecov Report

Attention: Patch coverage is 93.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 91.39%. Comparing base (a22abbe) to head (ba2c2a6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dsm/sources/RoadNetwork.cpp 86.53% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #289      +/-   ##
==========================================
+ Coverage   91.36%   91.39%   +0.03%     
==========================================
  Files          38       38              
  Lines        5270     5370     +100     
  Branches      459      467       +8     
==========================================
+ Hits         4815     4908      +93     
- Misses        455      462       +7     
Flag Coverage Δ
unittests 91.39% <93.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

std::for_each(outNeighbours.cbegin(),
outNeighbours.cend(),
[this, &pair, &angle, &allowedTurns](auto const& outNodeId) {
auto const& pOutStreet{

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
allowedTurns.emplace(Direction::LEFT);
}
}
});

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
}
});
auto const nLanes{pInStreet->nLanes()};
std::vector<Direction> newMapping(nLanes, Direction::STRAIGHT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
auto const nLanes{pInStreet->nLanes()};
std::vector<Direction> newMapping(nLanes, Direction::STRAIGHT);
switch (nLanes) {
case 1:

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
m_laneMapping = laneMapping;
std::string strLaneMapping;
std::for_each(
laneMapping.cbegin(), laneMapping.cend(), [&strLaneMapping](auto const item) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 13.1 rule Note

MISRA 13.1 rule
std::for_each(
outNeighbours.cbegin(),
outNeighbours.cend(),
[this, &pair, &pInStreet, &allowedTurns](auto const& outNodeId) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
if (deltaAngle < -std::numbers::pi / 6.) {
Logger::debug(
std::format("Street {} can turn RIGHT", pInStreet->id()));
allowedTurns.emplace(Direction::RIGHT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
} else if (deltaAngle > std::numbers::pi / 6.) {
Logger::debug(
std::format("Street {} can turn LEFT", pInStreet->id()));
allowedTurns.emplace(Direction::LEFT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
} else {
Logger::debug(
std::format("Street {} can go STRAIGHT", pInStreet->id()));
allowedTurns.emplace(Direction::STRAIGHT);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
});
auto const nLanes{pInStreet->nLanes()};
while (allowedTurns.size() < static_cast<size_t>(nLanes)) {
if (allowedTurns.contains(Direction::STRAIGHT)) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
graph.addNode(2, std::make_pair(-1., 0.));
graph.addNode(3, std::make_pair(1., 1.));
graph.addEdge<Street>(1, std::make_pair(0, 1), 1., 1., 3);
graph.addEdge<Street>(4, std::make_pair(1, 0), 1., 1., 3);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
graph.addNode(3, std::make_pair(1., 1.));
graph.addEdge<Street>(1, std::make_pair(0, 1), 1., 1., 3);
graph.addEdge<Street>(4, std::make_pair(1, 0), 1., 1., 3);
graph.addEdge<Street>(2, std::make_pair(0, 2), 1.);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
graph.addEdge<Street>(1, std::make_pair(0, 1), 1., 1., 3);
graph.addEdge<Street>(4, std::make_pair(1, 0), 1., 1., 3);
graph.addEdge<Street>(2, std::make_pair(0, 2), 1.);
graph.addEdge<Street>(8, std::make_pair(2, 0), 1.);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
graph.addEdge<Street>(4, std::make_pair(1, 0), 1., 1., 3);
graph.addEdge<Street>(2, std::make_pair(0, 2), 1.);
graph.addEdge<Street>(8, std::make_pair(2, 0), 1.);
graph.addEdge<Street>(3, std::make_pair(0, 3), 1., 1., 2);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
graph.addEdge<Street>(2, std::make_pair(0, 2), 1.);
graph.addEdge<Street>(8, std::make_pair(2, 0), 1.);
graph.addEdge<Street>(3, std::make_pair(0, 3), 1., 1., 2);
graph.addEdge<Street>(12, std::make_pair(3, 0), 1., 1., 2);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note test

MISRA 12.3 rule
@Grufoony Grufoony merged commit 792b515 into main Mar 25, 2025
31 checks passed
@Grufoony Grufoony deleted the autoMapStreetLanes branch March 25, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add autoStreetLaneMapping function to RoadNetwork class

2 participants